home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / nShell-Pro.sit / nShell-Pro / doc / nShell™ User's Guide.rsrc / TEXT_131.txt < prev    next >
Text File  |  1994-12-27  |  2KB  |  43 lines

  1.  
  2. Pathnames
  3.  
  4. The nShell(tm) uses traditional Macintosh pathnames to identify files and directories.  In the Macintosh file system the path to a file may be specified as one long name.  Because Macintosh names often have spaces in them, nShell allows the quoting of pathnames.  The command:
  5.  
  6.     cat 窶徇y file窶
  7.  
  8. would type a file called 窶徇y file窶 from your current directory onto the screen.  When you want to select a file on another disk, the name of the disk is added to the pathname.  The command:
  9.  
  10.     cat 窶徇y disk:my file窶
  11.  
  12. would type a file called 窶徇y file窶 from 窶徇y disk窶.  The 窶œ:窶 character is used to tell the Macintosh that you are specifying a path to a file, and not a file in the current directory.
  13.  
  14. If you wanted to identify a file in a specific directory on 窶徇y disk窶, you would add the name of that directory to the pathname.  The command:
  15.  
  16.     cat 窶徇y disk:my folder:my file窶
  17.  
  18. would type a file called 窶徇y file窶 from the directory 窶徇y folder窶 on 窶徇y disk窶.  This is called a full pathname because it specifies every name from the disk name to the file name.
  19.  
  20. You can also specify pathnames relative to your current directory.  If you start a pathname with a 窶œ:窶, the Macintosh knows that this path starts from your current directory.  The command:
  21.  
  22.     cat 窶œ:another folder:my file窶
  23.  
  24. would type a file from 窶彗nother folder窶 in your current directory.  Because some of this path is implied, it is called a partial pathname.
  25.  
  26. Another form of shorthand may be used with full or partial pathnames.  Using two 窶œ:窶捏 in a pathname means "up one directory".  If your current directory is "my disk:my folder", the command:
  27.  
  28.     cat 窶œ::my file窶
  29.  
  30. would move up from your current directory and type "my file" from 窶徇y disk窶.
  31.  
  32. Testing Paths
  33.  
  34. The nShell includes a command called pathchk, which allows you to experiment with pathnames.  When given a pathname, pathchk attempts to print the equivalent full pathname.  For example, if your current directory is 窶廩ard Disk:nShell窶 and you type the command:
  35.  
  36.     pathchk :bin
  37.  
  38. the response would be:
  39.  
  40.     Hard Disk:nShell:bin
  41.  
  42. The pathchk command does not change any files, and can safely be used to test pathnames before they are used.
  43.